<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <title>首页</title>
    <div th:replace="~{fragments/head-base}"></div>
</head>
<body class="body sidebar-left-hidden fixedNav_position fixedMenu_left">
<div class="preloader" style=" position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 100000;
  backface-visibility: hidden;
  background: #ffffff;">
    <div class="preloader_img" style="width: 200px;
  height: 200px;
  position: absolute;
  left: 48%;
  top: 48%;
  background-position: center;
z-index: 999999">
        <img th:src="@{/img/loader.gif}" style=" width: 50px;" alt="loading...">
    </div>
</div>
<!--wrap-->
<div id="wrap">
    <div th:replace="~{fragments/top :: top}"></div>
    <!-- /#top -->
    <div class="wrapper fixedNav_top">
        <div th:replace="~{fragments/left :: left}"></div>
        <!-- /#left -->
        <div id="content" class="bg-container">
            <header class="head">
                <div class="main-bar">
                    <div class="row no-gutters">
                        <div class="col-6">
                            <h4 class="m-t-5">
                                <i class="fa fa-home"></i><span class="ml-1">首页</span>
                            </h4>
                        </div>
                    </div>
                </div>
            </header>

            <div class="outer">
                <div class="inner bg-container">
                    <!--date-->
                    <div class="row mt-3">
                        <div class="col-3">
                        </div>
                        <div class="col-3">
                            <div class="card">
                                <div class="card-block ">
                                    <p><i class="fa fa-paper-plane"></i><span class="ml-1">快速跳转</span></p>
                                    <input type="number" id="problemId" name="problemId"
                                           class="form-control   focused_input" placeholder="例：1001，可跳至“A+B问题”">
                                    <div class="mt-3">
                                        <button onclick="skipProblemDetail()" class="btn btn-danger float-left"
                                                type="submit">跳转
                                        </button>
                                        <button type="button" class="btn btn-primary ml-2 float-left"
                                                onclick="randomProblem()">随机跳题
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--swtich problem-->
                    <div class="row mt-3">
                        <!--#轮播图-->
                        <div class="col-6">
                        </div>
                        <div class="col-6">
                            <div class="text-center ">
                                <span sec:authorize="isAuthenticated()">
                                    <h3>欢迎回来，<a class="text-primary">[[${#authentication.principal.name}]]</a></h3>
                                </span>
                                <h3 class="text-brown">今天是</h3>
                                <h3 class="text-danger">[[${#dates.format(nowDate,'yyyy')}]]&nbsp;年</h3>
                                <h3 class="text-success">[[${#dates.format(nowDate,'MM')}]]&nbsp;月</h3>
                                <h3 class="text-primary">[[${#dates.format(nowDate,'dd')}]]&nbsp;日</h3>
                            </div>
                        </div>
                    </div>
                    <div class="row mt-3">
                        <div class="col-3">
                        </div>
                        <div class="col-3">
                            <div class="card">
                                <div class="card-header bg-white">
                                    <i class="fa fa-bullhorn"></i><span class="ml-1">本站公告</span>
                                </div>
                                <div class="card-block">
                                    <div class="row">
                                        <div class="col-12">
                                            <div th:each="noticeBlog,status : ${noticeBlogList}">
                                                <a class="primary-hover"
                                                   th:href="@{'/blog/blogDetailPage?blogId='+${noticeBlog.id}}">
                                                    <div>[[${noticeBlog.title}]]</div>
                                                </a>
                                                <div class="mt-1">
                                                    <span class="gray-font ">发表于：[[${#dates.format(noticeBlog.createTime,'yyyy-MM-dd HH:mm:ss')}]]</span>
                                                    <span class="gray-font  float-right">浏览&nbsp;[[${noticeBlog.viewCount}]]</span>
                                                </div>
                                                <hr th:if="${status.count != status.size}" class="mt-3"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.inner -->
    </div>
    <!-- /.outer -->
    <!-- /#content -->
    <!-- Modal -->
    <div class="modal fade" id="search_modal" tabindex="-1" role="dialog" aria-hidden="true">
        <form th:action="@{/problem/problemListPage}" method="post">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span class="float-right" aria-hidden="true">&times;</span>
                    </button>
                    <div class="input-group search_bar_small">
                        <input type="text" class="form-control" placeholder="题目搜索" name="keyword">
                        <span class="input-group-btn">
                          <button class="btn btn-secondary" type="submit"><i class="fa fa-search"></i></button>
                        </span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <!-- /#content -->
    <!-- # right side -->
</div>
<!-- /#wrap -->
<!-- global scripts-->
<div th:replace="~{fragments/footer :: footer}"></div>
<!--end of global scripts-->
<!--  plugin scripts -->
<script type="text/javascript" th:src="@{/js/pages/index.js}"></script>
<!--end of plugin scripts-->
<script type="text/javascript" th:inline="javascript">


</script>
</body>

</html>
